biAnaly.picEditPanel = null;
biAnaly.blockingToolbar = null;

biAnaly.PictureAnalays = function(){
	
	return {
		anychartJson : null ,				//图形JSON数据
		chart : null,						//anychart 图形对象
		chartType : 'bar',					//图形类型（默认bar）
		drillManager : null,				//钻取管理
		initLayout : function(){
			// biAdhocNs.sql.SqlManager.initBoardTableMonth();
			var viewport = new Ext.Viewport({
				layout:'border',
				items:[{
					xtype : 'panel',
	                region:'center',	
	                layout:'border',
	                tbar:[biAnaly.picButton,biAnaly.tableManger,biAnaly.executeManage,biAnaly.saveInfo,biAnaly.i18n,biAnaly.upDrillManager],
	             	items:[{
             			region:'east',
             			id : 'card-data-edit-panel',
		                xtype : 'panel',
		                activeItem: 0,
		                layout:'card',
			            split:true,
		                width: 300,
						defaults: {border:false},
    					items : [{
			                xtype : 'panel',
			                layout:'accordion',
							listeners : {
								resize : function(panel, width, height) {
									var rootpanel = panel.items.itemAt(0);
									var p1 = rootpanel.items.itemAt(0);
									var length = p1.items.getCount();
									for (var i = 0; i < length; i++) {
										var c = p1.items.itemAt(i);
										var clength = c.items.getCount();
										c.setWidth(width);
										for (var j = 0; j < clength; j++) {
											var ctree = c.items.itemAt(j);
											ctree.setHeight((document.body.scrollHeight - 81) / 2 - 85);
											ctree.setWidth(width);
										}
									}
								}
							},
			                items: [{
		                		xtype:'panel',
		                		//title: '数据透视图筛选窗口',
		                		title: pictureanalyze.dataPivotChartFilterWindow,
		                		border:false,
				                layout: {
	                                type:'vbox',
	                                align:'stretch'
	                            },
				                items : [{ // 所有字段的试图
									xtype : 'uc_tabletreepanel',
									//title : '宽表字段视图',
									title : pictureanalyze.wideTableFieldView,
									id : 'picturetree',
									flex:1,
									iconCls : 'treeimage3',
									tools:[{
									    id:'gear',
									    qtip: 'Multi table settings',
									    // hidden:true,
									    handler: function(){
									    	var comp = Ext.getCmp('picturetree');
									    	var childNodes = Ext.getCmp('picturetree').root.childNodes;
									    	if(childNodes.length < 2) {
									    		return;
									    	} else {
									    		biAnaly.getMultiTableSettings(comp, null, null, 1);
									    	}

									    }
									}]

								},{
			                		xtype:'piceditpanel',
			                		id : 'pic-edit-panel',
			                		//title: '在以下区域间拖动字段',
			                		title: pictureanalyze.picEditPanel,
			                		border:false,
			                		flex:1,
			                		layout:'column',
			                		items : [{
				                		xtype:'columnpanel',
				                		id : 'report-filter',
				                		//title: '报表筛选',
				                		title: pictureanalyze.reportFilter,
				                		columnWidth: .5,
				                		height:100
				                	},{
				                		xtype:'columnpanel',
				                		id : 'legend-column',
				                		//title: '图例字段（系列）',
				                		title: pictureanalyze.legendColumn,
				                		enabledrop : false,
				                		recommendColumnCount: 2,
				                		columnWidth: .5,
				                		height:100
				                	},{
				                		xtype:'columnpanel',
				                		id : 'axis-column',
				                		//title: '轴字段（分类）',
				                		title: pictureanalyze.axisColumn,
				                		maxColumnCount : 1,
				                		columnWidth: .5,
				                		height:100
				                	},{
				                		xtype:'columnpanel',
				                		id : 'numerical',
				                		isNumerical : true,
				                		recommendColumnCount: 2,
				                		//title: '∑ 数值',
				                		title:pictureanalyze.numerical,
				                		columnWidth: .5,
				                		height:100
				                	}]
			                	}]
							},{
								id : 'anychart-prop-grid',
							 	//title: '图形属性',
								title:pictureanalyze.title,
								xtype : 'uc_anychart_prop'
							}]
			            },{//钻取链路面板
		             		xtype:'panel',
		             		layout	: 'fit',
		             		isDrillPanel : true,
		             		//title : '钻取链路',
		             		title : pictureanalyze.drillLink,
		             		items:[{
			               		xtype:'tabpanel',
			               		activeTab: 0,
			               		id:'drillLinkTabPanel-id',
			               		items:[]
		             		}],
		             		tools:[{
							    id:'close',
							    qtip: 'Close Drill',
							    handler: function(event, toolEl, panel){
							        Ext.getCmp('card-data-edit-panel').getLayout().setActiveItem(0);
							        Ext.getCmp('drillOpen-Btn').toggle(false);
							    }
							}]

			            }]
	             	},{
		            	xtype 	: 'panel',
		            	region	: 'center',
		            	layout	: 'vbox',
		            	layoutConfig: {
						    align : 'stretch',
						    pack  : 'start'
						},
						items : [{
			            	xtype : 'tabpanel' ,
			            	activeTab: 0,
			            	border : false,
			            	flex:1,
					        defaults:{autoScroll: false},
					        items:[{
					        	xtype : 'panel',
								id:'picrender',
								//title: '图形展示',
								title:pictureanalyze.graphicShow,
								margins:'5 5 5 0',
								bodyCfg: {
									id:'drop-div',
							   	 	tag: 'center',
							    	cls: 'drop-target'  
								}
							},{
								id : 'stat_data_panel',
								// xtype : 'statdatapanel',
								xtype : 'panel',
								//title : '数据汇总'
								title : pictureanalyze.dataSummarisation
							}]
						},{
			            	// xtype : 'uc_blocking',
			            	xtype : 'panel',
			            	id 	  : 'blocking-toolbar'
			            }]			            	
		            }]
	            }]
			});
		
			biAnaly.picEditPanel = Ext.getCmp('pic-edit-panel');
			biAnaly.blockingToolbar = Ext.getCmp('blocking-toolbar');
		},
		getAnyChart : function(){
			if(this.chart == null){
				this.chart = new AnyChart('../assets/anychart/swf/AnyChart.swf', '../assets/anychart/swf/Preloader.swf'); 
				
				this.chart.addEventListener('pointClick', this.onPointClick);

				this.chart.wMode = 'transparent'; // opaque
			  	this.chart.width = '100%';
			  	this.chart.height = '100%';
			  	this.chart.write("drop-div");
			  	
			}
			return this.chart;
		},
		/**
		 * 获取钻取Mangager
		 * @return biAnaly.DrillManager
		 */
		getDrillManager : function(){
			return this.drillManager;
		},
		/**
		 * 图形点单击事件
		 * 
		 * @deprecated 用于处理单击图形时的操作
		 */
		onPointClick : function(e) {
			
			var name = e.data.Name;
			// var value=e.data.YValue;
			var serieValue = e.data.Series.Name;
			alert(name);
			biAnaly.doShow("pie");
			return;
			// 取得钻取节点
			var node = biAnaly.picEditPanel.getToDrillNode();
			if (!node)
				return;

			// 确定该钻取点的值是存在name还是serieValue
			var valueFrom = "Name";// 默认从Name(轴字段)
			var configs = biAnaly.picEditPanel.getSeriesConfig();
			for (var i = 0; i < configs.topAxis.length; i++) {// leftAxis
				if (configs.topAxis[i].columnId == node.origColumnId)
					valueFrom = "Series.Name";
			}
			var value = biAnaly.getNameToCdValue(node.columnId,
					(valueFrom == "Name" ? name : serieValue));
			pictureAnalyze.drillInto(node, value);

		},
		getChartData : function(data){
			if(this.anychartJson == null)
				this.anychartJson = new biAnaly.AnyChartJson();
			var anychartJson = this.anychartJson;
			
			//设置图形类型
			anychartJson.charts.chart.plot_type = (this.chartType == 'pie' ? "Pie" : "CategorizedVertical");	
			anychartJson.charts.chart.data_plot_settings.default_series_type = this.chartType;

			//更新图形属性
			var propGrid = Ext.getCmp('anychart-prop-grid');
			propGrid.updateAnychartProp(anychartJson);
			
			//设置显示数据
			anychartJson.charts.chart.data = data;
			
			return anychartJson;
		},
		/**
		 * 刷新数据(anychart)
		 */
		refresh : function( result ){
			
			if(!result.rows || result.rows.length == 0){
				this.getAnyChart().setJSData(this.getChartData( null ));
				//Ext.qtip.error('提示', "没有数据。");
				Ext.qtip.error(pictureanalyze.prompt, pictureanalyze.noData);
				return;				
			}

			var configs = biAnaly.picEditPanel.getSeriesConfig();
			
			var drillManager = this.getDrillManager();
			if(!drillManager){
				drillManager = new biAnaly.DrillManager();
				drillManager.updateLink(configs);
				this.drillManager = drillManager;
			}

			drillManager.setDrillList(result.drillList);
			
			var convert = drillManager.getConverts();
			var linkDrillCapability = drillManager.getLinksDrillCapability();
			
			//旋转数据
			var rows = biAnaly.RecordPivot.pivot(result.rows ,configs.numerics ,convert);
			
			//图形展示
			var data = biAnaly.picEditPanel.transformToAnychart( rows );
			
			var anychartJson = this.getChartData( data );
			this.getAnyChart().setJSData(anychartJson);
			
			//数据汇总
			var dataPanel = Ext.getCmp('stat_data_panel');
			dataPanel.setPicEditPanel(biAnaly.picEditPanel);
			//加载数据
			dataPanel.loadData(rows ,linkDrillCapability);

		}
	};
}

/**
 * Anychart 的图形属性配置
 * @class biAnaly.AnychartPropertyGrid
 * @extends Ext.grid.PropertyGrid
 * @author chenzhuangwei
 */
biAnaly.AnychartPropertyGrid = Ext.extend(Ext.grid.PropertyGrid,{
	collapsible: true,
	split: true,
    width: 235,
    minSize: 175,
	maxSize: 400,
	margins: '0 5 0 0',
	layout: 'fit',
	customEditors: {
        'legend_position': new Ext.grid.GridEditor(new Ext.form.ComboBox({
    		store : ['Left','Right','Top','Bottom','Float'],
	        triggerAction: 'all',
	        selectOnFocus:true
	    })),
        'legend_align': new Ext.grid.GridEditor(new Ext.form.ComboBox({
    		store : ['Near','Far','Center','Spread'],
	        triggerAction: 'all',
	        selectOnFocus:true
	    }))
    },
	/*propertyNames:{
        "chart_title"			: "标题",
        "title_enabled"			: "标题显示",
        "axis_title_enabled"	: "轴标题显示",
        "title_font_size"		: "标题字体大小",
        "axis_title_font_size"	: "轴标题字体大小",
        "animation"				: "动画展示",
        "legend_enabled"		: "图例显示",
        "legend_position"		: "图例位置",
        "legend_align"			: "图例对齐",
        "y_axis_title"			: "值（Y）标题"
        //"3d_mode": "三维展示",
        // "x_axis_title"			: "类别（X）标题",
    },*/
   /* source: {
      	"chart_title"			: 数据透视图,
      	"title_enabled"			: true,
      	"axis_title_enabled"	: true,
      	"title_font_size" 		: 12,
      	"axis_title_font_size" 	: 12,
      	"animation"				: true,
      	"legend_enabled"		: true,
      	"legend_position"		: "Right",
      	"legend_align"			: "Near",
      	"y_axis_title"			: "∑ 数值"
       	//"3d_mode": true,
      	// "x_axis_title"			: "分类",
    },*/
    propertyNames:{
        "chart_title"			: pictureanalyze.chart_title,
        "title_enabled"			: pictureanalyze.title_enabled,
        "axis_title_enabled"	: pictureanalyze.axis_title_enabled,
        "title_font_size"		: pictureanalyze.title_font_size,
        "axis_title_font_size"	: pictureanalyze.axis_title_font_size,
        "animation"				: pictureanalyze.animation,
        "legend_enabled"		: pictureanalyze.legend_enabled,
        "legend_position"		: pictureanalyze.legend_position,
        "legend_align"			: pictureanalyze.legend_align,
        "y_axis_title"			: pictureanalyze.y_axis_title
        //"3d_mode": "三维展示",
        // "x_axis_title"			: "类别（X）标题",
    },
    source: {
      	"chart_title"			: pictureanalyze.chart_title_value,
      	"title_enabled"			: true,
      	"axis_title_enabled"	: true,
      	"title_font_size" 		: 12,
      	"axis_title_font_size" 	: 12,
      	"animation"				: true,
      	"legend_enabled"		: true,
      	"legend_position"		: "Right",
      	"legend_align"			: "Near",
      	"y_axis_title"			: pictureanalyze.y_axis_title_value
       	//"3d_mode": true,
      	// "x_axis_title"			: "分类",
    },
    /**
     * 更新Anychart相关配置
     * @param {} anychartJson
     * @return {}
     */
    updateAnychartProp : function( anychartJson ){
		var prop = this.getSource();
		var type = anychartJson.charts.chart.data_plot_settings.default_series_type;
		var seriesCfg = biAnaly.picEditPanel.getSeriesConfig();
		var x_axisText = [];
		for(var i = 0 ; i < seriesCfg.leftAxis.length; i++){//topAxis
			x_axisText.push( pictureAnalyze.drillManager ? pictureAnalyze.drillManager.replaceCName( seriesCfg.leftAxis[i].cName ) : seriesCfg.leftAxis[i].cName);
		}
		anychartJson.settings.animation.enabled = prop["animation"];
		//anychartJson.charts.chart.data_plot_settings.enable_3d_mode.enabled = prop["3d_mode"];
		
		var chart_settings = anychartJson.charts.chart.chart_settings;
		//图例设置
		chart_settings.legend.enabled = (type == 'pie' ? false : prop["legend_enabled"]);
		chart_settings.legend.position = prop["legend_position"];
		chart_settings.legend.align = prop["legend_align"];

		//标题名称
		chart_settings.title.text = prop["chart_title"];
		//chart_settings.axes.x_axis.title.text = '轴字段：' + x_axisText.join("-");//prop["x_axis_title"];
		chart_settings.axes.x_axis.title.text = pictureanalyze.updateAnychartProp.x_axis_title + x_axisText.join("-");//prop["x_axis_title"];
		chart_settings.axes.y_axis.title.text = prop["y_axis_title"];
		
		//是否显示标题
		chart_settings.title.enabled = prop["title_enabled"];
		chart_settings.axes.x_axis.title.enabled = prop["axis_title_enabled"];
		chart_settings.axes.y_axis.title.enabled = prop["axis_title_enabled"];
		
		//标题字体大小
		chart_settings.title.font.size = prop["title_font_size"];
		chart_settings.axes.x_axis.title.font.size = prop["axis_title_font_size"];
		chart_settings.axes.y_axis.title.font.size = prop["axis_title_font_size"];
    },
    /**
     * 更新图形属性
     * @param {} anychartJson
     * @return {}
     */
    updateChartProp : function( anychartJson ){
    	var obj=eval('('+anychartJson+')');
		this.setSource(obj);
    }
});

biAnaly.getMultiTableSettings= function(panel, type, mtrArray, isShow){
	
	if(panel.multiTableSettingsTooltip != null) {
		if(isShow ==1 ) {   //区分编辑时后台加载多表关联UI, 及通过齿轮选择， 区别UI是否显示
			panel.multiTableSettingsTooltip.isShow = 1; 
		}
		panel.multiTableSettingsTooltip.show();
	} else {
		var dataStore = new Ext.data.ArrayStore({
			 fields : ['value'],
			 data : [[pictureanalyze.multiTableSettings.leftjoin], [pictureanalyze.multiTableSettings.rightjoin],[pictureanalyze.multiTableSettings.fulljoin]]
			});

		var relatedBox = new Ext.form.ComboBox({
			id : 'relatedBoxId',
//			width : 120,
			triggerAction : "all",//是否开启自动查询功能
			store : dataStore,//定义数据源
			displayField : "value",//关联某一个逻辑列名作为显示值
			mode : "local",//如果数据来自本地用local 如果来自远程用remote默认为remote
			lazyInit:false, 
			editable:false, 
			triggerAction:'all', 
			listeners:{ 
			afterRender:function(combo){ 
				var firstValue=dataStore.reader.arrayData[0]; 
				combo.setValue(firstValue);//同时下拉框会将与name为firstValue值对应的text显示 
			} 
		  }

		});
		
		var childNodes = Ext.getCmp('picturetree').root.childNodes;
		var sourceDataTemp = [];
		var desDataTemp = [[]];
		var sourceNodes = childNodes[0].childNodes;
		var desNodes = childNodes[1].childNodes;
		var autoMatchingField = [];
		var matchingText = "";
		var matchingName = "";
		for(var i=0; i<sourceNodes.length; i++ ){
			if(sourceNodes[i].attributes.isPrimaryKey == 1) {
				sourceDataTemp.unshift([sourceNodes[i].text,sourceNodes[i].attributes.tableId + "=" + sourceNodes[i].attributes.id,,]) ;
				autoMatchingField.push(sourceNodes[i].id);
				matchingText = sourceNodes[i].text;
			} else {
				sourceDataTemp.push([sourceNodes[i].text,sourceNodes[i].attributes.tableId + "=" + sourceNodes[i].attributes.id,,]) ;
			}
		}

		for(var j=0; j<desNodes.length; j++ ){    
			desDataTemp.push([desNodes[j].attributes.tableId + "=" + desNodes[j].attributes.id, desNodes[j].text]);
			if(desNodes[j].attributes.isPrimaryKey == 1) {
				autoMatchingField.push(desNodes[j].id);
				matchingName = desNodes[j].attributes.tableId + "=" + desNodes[j].attributes.id;
			}
		}

		 //准备数据  
		var desData = new Ext.data.SimpleStore({  
		    fields:['name','value'],  
		    data:desDataTemp  
		  })  ;
		
		          
		var ColmnObject = Ext.data.Record.create([  
		          {name:'sname',mapping:0}, 
		          {name:'firstColumn',mapping:1}, 
		          {name:'op',mapping:2},  
		          {name:'dname',mapping:3}, 
		          {name:'lastColumn',mapping:4}
		         ]); 
		    
		var sourceDataStore = new Ext.data.Store({  
		    	reader:new Ext.data.ArrayReader({id:0}, ColmnObject),  
		    	data:sourceDataTemp  
		    });
		         
		var editGridPanelOfColumns = new Ext.grid.EditorGridPanel({  
		           width:590,  
		           height:180, 
//		           border:false,
		           bodyBorder : false,
		           id : 'editGridPanelOfColumns',
		           frame:true,  
		           store:sourceDataStore,  
		            columns:[  
		                {header:pictureanalyze.multiTableSettings.source_table_field,width:230,dataIndex:'sname'},
		                {header:pictureanalyze.multiTableSettings.source_table_field,width:50,dataIndex:'firstColumn',hidden : true},  
		               {header:'',width:97,dataIndex:'op'
		            	   , 
		            	   editor:new Ext.form.ComboBox({  
		            		   editable:false,  
		            		   displayField:'op',  
		            		   mode:'local',  
		            		   triggerAction:'all',  
		            		   store:new Ext.data.SimpleStore({  
		            		   fields:['op'], 
		            		   cls:'x-combo-list-item',
		            		   data:[[''],[pictureanalyze.multiTableSettings.equal]]  
		            		    })  
		            	 })  

		                },  
		                {header:pictureanalyze.multiTableSettings.target_table_field,width:230,dataIndex:'dname',  
		                 editor:new Ext.form.ComboBox({  
		                    editable:false,
		                    id :'comboboxId',
		                    valueField :'name',
		                    displayField :'value',
		                    mode:'local',  
		                    triggerAction:'all',  
		                    store:desData 
		                   
		                 })}
		                 ,{header:pictureanalyze.multiTableSettings.target_table_field,width:50,dataIndex:'lastColumn',hidden : true} 
		              
		            ]  
		          
		           
		         });  
		

		panel.multiTableSettingsTooltip = new Ext.Window( {
			title : pictureanalyze.multiTableSettings.title,
			id : 'mutiltablerelated-edit',
			anchor : 'bottom',
			parentID : '',
			autoHide : false,
			closable : true,
			closeAction:'hide',
			resizable:false,
			hidden : true,
			target : null,
			bodyStyle : 'padding:0px;overflow-y:auto;overflow-x:hidden;',
			html : null,
			width : 600,
			maxWidth : 600,
			isShow :0,
			draggable : { // 监控move
				insertProxy : false,
				onDrag : function(e) {
				},
				endDrag : function(e) {
				}
			},
				items : [ 
				          {
					layout : 'column',
					width : 595,
					defaults : {
						hideLabel : true
					},
					items : [{
						
						columnWidth : .35,
						xtype : 'fieldset',
						border :false,
						id : 'left-content',
						autoHeight : false,
						cls : ((Ext.isIE6) ? 'availableLot-filter-x-ie6'
								: 'availableLot-filter-x'),
						height : 40,
						listeners : {
							'afterrender' : function(fset) {
								panel.multiTableSettingsTooltip.setContentEditable(
									fset,
									'left-content-box2',
									true); // 设置为编辑
							}
						}
					},{
						columnWidth : .30,
						border :false,
						labelAlign:'center',
						style:'padding-top:8px;',
						height : 40,
						items: [relatedBox]
					},{
						columnWidth : .35,
						xtype : 'fieldset',
						border :false,
						id : 'right-content',
						cls : ((Ext.isIE6) ? 'availableLot-filter-x-ie6'
								: 'availableLot-filter-x'),
						autoHeight : false,
						height : 40,
						listeners : {
							'afterrender' : function(fset) {
								panel.multiTableSettingsTooltip.setContentEditable(
												fset,
												'right-content-box2',
												true); // 设置为编辑
							}
						}
				}]
			},{
				columnWidth : 1,
				border :false,
				labelAlign:'center',
				style:'padding:0px;',
				height : 180,
				items: [editGridPanelOfColumns]
			}],
				
			buttons: [{
				text: pictureanalyze.multiTableSettings.ambt_text,
				handler: function(){
					if(autoMatchingField.length > 2){//联合主键情况
							sourceDataStore.data.items[0].data.op = pictureanalyze.multiTableSettings.equal;
							sourceDataStore.data.items[0].data.dname = matchingText;
							sourceDataStore.data.items[0].data.lastColumn = matchingName;
							editGridPanelOfColumns.view.refresh(); // 列表数据刷新显示      ghq 
					} else if(autoMatchingField.length == 2) {
						if (autoMatchingField[0] == autoMatchingField[1]){ 
							sourceDataStore.data.items[0].data.op = pictureanalyze.multiTableSettings.equal;
							sourceDataStore.data.items[0].data.dname = matchingText;
							sourceDataStore.data.items[0].data.lastColumn = matchingName;
							editGridPanelOfColumns.view.refresh(); // 列表数据刷新显示      ghq 
						} 
					} else {
						Ext.Msg.show({
							title : toolbar.msgTitle,
							modal : true,
							msg : pictureanalyze.multiTableSettings.promotMsg,
							buttons : Ext.Msg.OK,
							width : 250
						});
					}
				}
			},{
				text: pictureanalyze.multiTableSettings.subt_text,
				handler: function(){
					panel.multiTableSettingsTooltip.hide();
				}
			}]
			,
			listeners : {
				beforeshow : function(tip) {
					try {
						Ext.getDom('left-content-box2').innerHTML = '';
						Ext.getDom('right-content-box2').innerHTML = '';
					} catch (e) {
					}
				},
				show : function(tip) { // 还原对象
					var left_cb = Ext.getDom('left-content-box2');
					left_cb.onfocus = null;
					left_cb.innerHTML = childNodes[0].text;

					var right_cb = Ext.getDom('right-content-box2');
					right_cb.innerHTML = childNodes[1].text;
					
					if(mtrArray != null) {
						var data = sourceDataStore.data.items;
						for(var i=0; i<mtrArray.length; i++) {
							var mainColumn = mtrArray[i].cnMaincolumnId;
							for(var j=0; j<data.length; j++) {
								if(mainColumn == data[j].data.sname) {
									data[j].data.lastColumn = mtrArray[i].relaTableId + "=" + mtrArray[i].relaColumnId;
									data[j].data.op = pictureanalyze.multiTableSettings.equal;
									data[j].data.dname = mtrArray[i].cnRelacolumnId;
								}
							}
						}
						editGridPanelOfColumns.view.refresh();
						
						if (panel.multiTableSettingsTooltip.isShow == 0) {
							panel.multiTableSettingsTooltip.hide();
						}
				}}
			},

			/**
			 * 在lf对象中增加可编辑的span标签
			 * 
			 * @param lf
			 *            父对象
			 * @param cid
			 *            span的id
			 * @param editable
			 *            是否可编辑 boolean
			 */
			setContentEditable : function(lf, cid, editable) { // 将某个对象设置为可编辑状态
				var dom = lf.body.dom;
				var height = parseInt(dom.style.height);
				var width = height;
				var clicks = [
						'biAdhocNs.conditionFilterObj.spanOnClick( \'',
						cid, '\');' ].join('');
				dom.innerHTML = [ '<SPAN id=', cid,
						' class="dom-scrollbar-show" style="width: ',
						width, '; height: ', height,
						'" contentEditable="', editable, '" onclick="',
						clicks, '" onfocus="', clicks, '" onkeyup="',
						clicks, '"></SPAN>' ].join('');
			}
		});
		
		Ext.getCmp('editGridPanelOfColumns').on('afteredit',function(e){ //获得Ext.grid.EditorGridPanel编辑信息   
			
			var en_column = e.value;
			var viewText = Ext.getCmp("comboboxId").lastSelectionText;
			e.record.data.dname = viewText;
			if(e.column == 3) {
				e.record.data.lastColumn = en_column;
			}
			 editGridPanelOfColumns.view.refresh(); // 列表数据刷新显示  
		  });
		
		
			panel.multiTableSettingsTooltip.show();
	}
	
};

Ext.reg('uc_anychart_prop', biAnaly.AnychartPropertyGrid);
